<?php $items = $this->requestAction('/portfolios/recent/9'); 

?>

<div class="portfolio">
	<h2 class="hide">Latest work</h2>
	<?php foreach ($items as $portfolio): ?>
		<a href="<?php echo $html->url(array('plugin'=>'portfolios','controller'=>'portfolios', 'action'=>'view', $portfolio['Portfolio']['slug'])); ?>">
			<?php if( isset($portfolio['Upload'][0]['filename']) ): ?>
					<span class="crop">
				<?php $full = $portfolio['Upload'][0]['dir'] . DS . $portfolio['Upload'][0]['filename'];
				echo $gershImage->resize($full, 'portfolio_front', array('title' => $portfolio['Upload'][0]['title'], 'alt'=>$portfolio['Upload'][0]['title']));?>
					</span>
			<?php endif; ?>
			<span class="title"><?php echo $portfolio['Portfolio']['title']; ?></span>
		</a>
	<?php endforeach; ?>
</div>
<?php //debug($items)?>